<?php
require __DIR__.'/../MTCloud.class.php';

try{
    $MTCloud = new MTCloud();
    $res = $MTCloud->courseAccess(1590825,'wb12','wb12', 'user',3600, array('avatar' => 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1744793982,732322269&fm=11&gp=0.jpg', 'ssl' => true));
    var_dump("<pre>");
    var_dump("学员1：" ,$res);
    


    $res2 = $MTCloud->courseAccess(1590825,'he','he', 'user',3600, array('avatar' => 'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1443234040,1957998549&fm=11&gp=0.jpg', 'ssl' => true));
    var_dump("学员2：" ,$res2);

    $res4 = $MTCloud->courseAccess(1590825,'test-wb','test-wb1', 'user',3600, array('avatar' => 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3198262405,3278033417&fm=11&gp=0.jpg', 'ssl' => true));
    var_dump("学员3：" , $res4);

    $res3 = $MTCloud->courseAccess(1590825,'admin0','admin0', 'admin',3600, array('avatar' => 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1942991718,3549578323&fm=11&gp=0.jpg', 'ssl' => true));
    var_dump("助教：" ,$res3);

    
    $res6 = $MTCloud->courseAccess(1590825,'guest-wb','guest-wb', 'guest',3600, array('avatar' => 'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2760303588,2399580167&fm=11&gp=0.jpg', 'ssl' => true));
    var_dump("游客：" , $res6);

    // $res5 = $MTCloud->courseAccess(1565159,'watch0','watch0', 'watch',3600, {"avatar" => 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3380550544,3089483679&fm=26&gp=0.jpg', "ssl" => true, "gid" => 1});
    // var_dump($res5);
    	// $res = $MTCloud->courseAccessPlayback(1587149,'用户2','student1215', 'user',3600,['avatar' => '']);
    // var_dump($res);
}catch(MTCloudException $e){
    var_dump($e->getMessage());
}




